package com.color.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.request.WebRequest;

import com.color.service.IOpenNoService;

@Controller
public class OpenNoCtrl {
	
	@Autowired
	@Qualifier("openNoService")
	private IOpenNoService openNoService;
	
	
	@ResponseBody
	@RequestMapping(value="/color/getOpen.htm",method = {RequestMethod.GET,RequestMethod.POST})
	public Map<String, Object> getPageList(ModelMap model,WebRequest request){
 		return openNoService.getPageList(model,request);
	}
	
	@RequestMapping(value="/color/getOpenPage.htm",method = {RequestMethod.GET,RequestMethod.POST})
	public String getMain(){
		return "color/openno";
	}
	
	@ResponseBody
	@RequestMapping(value="/color/commitOpen.htm",method = {RequestMethod.GET,RequestMethod.POST})
	public Map<String,Object> commitData(ModelMap model,WebRequest request){
		return openNoService.commitData(request);
	}
	
}
